package com.gof.example.mediator;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/11 08:43.
 * haiming.fei@tongdun.cn
 */
public class App {

    public static void main(String[] args) {
        ListPane p1 = new ListPane();
        TextPane p2 = new TextPane();
        GraphicPane p3 = new GraphicPane();

        Window mediator = new Window();
        mediator.setListPane(p1);
        mediator.setTextPane(p2);
        mediator.setGraphicPane(p3);

        p1.setMediator(mediator);
        p2.setMediator(mediator);
        p3.setMediator(mediator);

        p1.change();
        System.out.println("===========");
        p2.change();
        System.out.println("===========");
        p3.change();
    }
}
